package Agency.views;
import java.awt.Color;
import javax.swing.DefaultListModel;
import javax.swing.JButton;


/**
 *
 * @author wangari
 */
public class AvailableHouses extends javax.swing.JFrame {
static DefaultListModel HouseTypeList = new DefaultListModel();
    /**
     * Creates new form AvailableHouses and sets the back ground color to light grey
     */
    public AvailableHouses() {
        this.getContentPane().setBackground(Color.LIGHT_GRAY);
        initComponents();
        setLocationRelativeTo(null);
    }
    /**
     * button to show all the apartments available in all towns
     * @return jBApartments
     */
    public JButton getApartments(){
        return jBApartments;
    }
    /**
     * Button to show all 3 bedroom houses available in all towns
     * @return 
     */
     public JButton get3BedRoom(){
        return jB3BedRoom;
    }
     /**
      * Button to show all the 2 bedroom houses available in all towns
      * @return jB2BedRoom
      */
      public JButton get2BedRoom(){
        return jB2BedRoom;
    }
      /**
       * Button to show the available 1 bed room houses in all towns
       * @return 
       */
       public JButton get1BedRoom(){
        return jB1BedRoom;
    }
       /**
        * Button to show the number of available bedsitter in all towns
        * @return jBBedSitter
        */
        public JButton getBedSitter(){
        return jBBedSitter;
    }
        /**
         * button to show all the available single rooms
         * @return jBSingleRoom
         */
       public JButton getSingleRoom(){
        return jBSingleRoom;
    }
       /**
        * Button to close the view
        * @return jBClose
        */
         public JButton closeView(){
        return jBClose;
    } 
         /**
          * DefaultListModel to return the list with the houses
          * @return HouseTypeList
          */
      public DefaultListModel getTheList(){
        return HouseTypeList;
    }
 
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jBApartments = new javax.swing.JButton();
        jB3BedRoom = new javax.swing.JButton();
        jB2BedRoom = new javax.swing.JButton();
        jB1BedRoom = new javax.swing.JButton();
        jBBedSitter = new javax.swing.JButton();
        jBSingleRoom = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jLHouseType = new javax.swing.JList();
        jBClose = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setText("Available Houses");

        jBApartments.setText("Apartments");

        jB3BedRoom.setText("3 BedRooms");

        jB2BedRoom.setText("2 BedRooms");

        jB1BedRoom.setText("1 BedRoom");

        jBBedSitter.setText("Bed Sitter");

        jBSingleRoom.setText("Single Room");

        jLHouseType.setModel(HouseTypeList);
        jScrollPane1.setViewportView(jLHouseType);

        jBClose.setText("Close");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(309, 309, 309)
                .addComponent(jLabel1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jBSingleRoom, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)
                    .addComponent(jB2BedRoom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBApartments, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jB3BedRoom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jB1BedRoom, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBBedSitter, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 67, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 453, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(jBClose)
                        .addGap(184, 184, 184))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(52, 52, 52)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jBApartments, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(27, 27, 27)
                        .addComponent(jB3BedRoom, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jB2BedRoom, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(28, 28, 28)
                        .addComponent(jB1BedRoom, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(26, 26, 26)
                        .addComponent(jBBedSitter, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jBSingleRoom, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jBClose)))
                .addContainerGap(15, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

  


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jB1BedRoom;
    private javax.swing.JButton jB2BedRoom;
    private javax.swing.JButton jB3BedRoom;
    private javax.swing.JButton jBApartments;
    private javax.swing.JButton jBBedSitter;
    private javax.swing.JButton jBClose;
    private javax.swing.JButton jBSingleRoom;
    private javax.swing.JList jLHouseType;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    // End of variables declaration//GEN-END:variables
}
